package team.jaman.autosell.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import team.jaman.autosell.entity.Orderdetail;
import team.jaman.autosell.service.OrderdetailService;
import team.jaman.autosell.tools.PageData;

/**
 * 订单详情控制器
 * @author Administrator
 *
 */
@Controller
@RequestMapping("orderdetail")
public class OrderdetailController {

	@Autowired
	private OrderdetailService orderdetailService;
	
	@GetMapping("showOrderdetailList")
	@ResponseBody
	public PageData<Orderdetail> selectOrderdetailByOrderId(@RequestParam(value="page",defaultValue="1") int page, @RequestParam(value="limit",defaultValue="10") int limit, @RequestParam(value="orderId") String orderId){
		return orderdetailService.selectOrderdetailByOrderId(page, limit, orderId);
	}
}
